package org.datedemo;

import java.util.Calendar;
import java.util.Date;

public class DateDemo {
    public static void main(String[] args) {
        Date d1 = new Date("1985/10/20 18:20:30");
        Date d2 = new Date("1985/10/20 18:20:31");
        System.out.println(d1);
        System.out.println(d2);
        System.out.println(d1.after(d2)); //false
        System.out.println(d1.before(d2));//true
        System.out.println(d2.after(d1));//true
        System.out.println(d2.before(d1));//false

        Calendar c = Calendar.getInstance();
    }
}
